package com.example.designmode.facade;

//外观模式同一对上层暴露的类
public class Facade {

    private Fund fund;
    private Stock stock;

    public Facade(){
        fund = new Fund();
        stock = new Stock();
    }

    //同一对外暴露的买入功能
    public void buy(){
        System.out.println(fund.buy() + " " + stock.buy());
    }

    //同一对外暴露的卖出功能
    public void sell(){
        System.out.println(fund.Sell() + " " + stock.Sell());
    }
}
